<template>
    <div class="center-block">
        <div class="title"  :style="{backgroundColor:theme}">{{title}}</div>
        <div>
            <slot></slot>
        </div>
    </div>
</template>
<script>
    export default {
        name: "CenterBlock",
        props:["title"],
        data() {
            return {}
        },
        computed:{
          theme() {
            return this.$store.state.baseSettings.theme;
          },
        }
    }
</script>
<style lang="scss" scoped>
    .center-block {
        width: 100%;
        box-shadow: -5px 0 10px -5px #ccc, 5px 0 10px -5px #ccc;
        height: 100%;
        .title {
            padding: 5px 20px;
            line-height: 32px;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            border-top-right-radius: 5px;
            border-bottom-right-radius: 5px;
            color: #fff;
            height: 42px;
            width: 82px;
            top: 20px;
        }
        div:nth-child(2){
            padding: 10px;
        }
    }
</style>
